import {
  BrowserRouter as Router,
  Switch,
  Route
} from "react-router-dom";
import NotFound from './layout/404'
import Error from './layout/error'
import BaseLayout from './layout/base'
import PrivateRoute from './components/PrivateRoute'


function App() {
  return (
    <Router>
      <Switch>
        <Route path="/404" exact>
          <NotFound />
        </Route>
        <Route path="/error" exact>
          <Error />
        </Route>
        <Route path="/login" exact>
          <div>登陆页</div>
        </Route>
        <PrivateRoute path="*">
          <BaseLayout />
        </PrivateRoute>
      </Switch>
    </Router>
  );
}

export default App;
